@extends('web.common.main')
@section('container')
<div class="v3-contain">
    <div class="v3-list j_tab">
        @include('web.common.bread_menu_tab')
        <div class="v3-filter">
            @forelse($filterInfo as $key=>$value)
            <dl class="j_filterCheck">
                <dt>{{$value['name']}}</dt>
                <dd>
                    @forelse($value['value'] as $key1=>$value1)
                    <a data-value="{{$key1}}"><i></i>{{$value1}}</a>
                    @empty
                    @endforelse
                </dd>
            </dl>
            @empty
            @endforelse
        </div>
        <div class="v3-filter_title">以下是搜索结果</div>
        <div class="v3-filter_result">
            <ul class="list list-sm j_dataList">
                @include('web.asset.list.project')
            </ul>
            <input class="j_filterType" type="hidden" value="1">
            <input id="j_pageNo" type="hidden" value="1" data-tot="{{$pageCount}}" data-url="/asset_coo">
            <a class="v3-load_more j_loadMore">加载更多...</a>
        </div>
    </div>
</div>
@endsection

@section('script')
<script>
    (function ($) {
        $(function () {
            $('.v3-filter dl a').click(function () {
                var $t = $(this);
                var $p = $t.parent();
                if(!$t.hasClass('current')){
                    $p.find('a.current').removeClass('current');
                    $t.addClass('current');
                }else{
                    $t.removeClass('current');
                }
                //重置当前页数据
                $('#j_pageNo').val(0);
                var $list = $('.j_dataList');
                $list.html('');
                if($('.j_loadMore').length == 0){
                    $list.parent().append('<a class="v3-load_more j_loadMore">加载更多...</a>');
                }
                $(window).scroll();
            });
        });
    })(jQuery);
</script>
@endsection
